
# 输入：请求 #输出：审批者(ID)
def get_responder(request):
    user = request.user

    # 获取审批者
    # 1.部门的leader就是自己(部门的领导就是自己)
    if user.department.leader.uid == user.uid:
        if user.department.name == "董事会":
            responser = None
        else:
            responser = user.department.manager

    # 2.如果不是部门leader
    else:
        responser = user.department.leader

    return responser